using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using DaViL.Controls;

namespace ChartTest
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            TemporalChart chart = new TemporalChart();
            chart.Title = "Chart test";

            Random rnd = new Random(Environment.TickCount);
            for (int i = 0; i < 3; i++)
            {
                ChartLine line = new ChartLine(String.Format("Line {0}", i));
                DateTime date = DateTime.Now.AddDays(rnd.Next(-10, 10));

                for (int j = 0; j < rnd.Next(3, 10); j++)
                {
                    line.Points.Add(new ChartPoint(date, rnd.Next(-10, 35)));
                    date = date.AddDays(rnd.Next(1, 10));
                }

                chart.Lines.Add(line);
            }

            chart.Dock = DockStyle.Fill;
            this.Controls.Add(chart);
        }
    }
}